package org.wzq.spring_aop;

import org.springframework.aop.AfterReturningAdvice;
import org.springframework.aop.MethodBeforeAdvice;

import java.lang.reflect.Method;

/**
 * Created by wzq on 14-11-18.
 */
public class LogBeforeAdvice implements MethodBeforeAdvice {
    @Override
    public void before(Method targetMethod, Object[] args, Object targetClass) throws Throwable {
        String className = targetClass.getClass().getName();
        String methodName = targetMethod.getName();
        String info = "logBefore,"+className+"."+methodName+"() be called";
        System.out.println(info);
    }
}
